#include<netdb.h>
#include<sys/socket.h>
#include<stdio.h>
main(int argc,char *argv[])
{
	struct hostent *host;
	if(argc<2) return;
	host = gethostbyaddr(argv[1],sizeof(argv[1]),AF_INET);
	if(host == (struct hostent *)NULL)
	{
	 	herror("gethostbyaddr");
	}
	else
	{
		printf("name :%s \n",host->h_name);
		printf("type :%d \n",host->h_addrtype);
		printf("addr :%s \n",host->h_addr_list[0]);
	}
}